package healththink
//import grails.plugins.springsecurity.*

class HealthThink {
    //static def springSecurityService

    /* Single Instance variables for testing/development */
    static Email sEmail = new Email(
		   email:"test@test.com"
		   )
                   
    static User sUser = new User(
			birthday: new Date(),
			firstName: "testFN",
			lastName: "testLN",
			//password: springSecurityService.encodePassword("password"),
                        password: "grailsequfails",
                        username: "test",
			email:"test@test.com"
            //            email: healththink.HealthThink.getStaticEmail()
                    )
                    
    static Address sAddress = new Address(
		   address:"line 1",
		   address2: "Line 2",
		   lga: "test LGA",
                   state: "Test State"
		   )
                   
    static TelephoneNumber sPhone = new TelephoneNumber(
			number:"(555)123-1234",
			phoneType:PhoneType.Cell
		  )
    
    static Facility sFacility = new Facility(
			name: "Test Facility",
			latitude: 0,
			longitude: 0,
			facilityType: FacilityType.Hospital
			)
                        
    static FacilitySite sFacilitySite = new FacilitySite(
                    additionalServices: "Test Additional Services",
                    detail: "Test Detail",
                    graphicLocation: "Test Graphic Location",
                    missionStatement: "Test Mission Statement",
                    summaryFooter: "Test Summary Footer",
                    summaryHeader: "Test Summary Header"
                    )
                    
    static Attribute sAttribute = new Attribute(
                    user: healththink.HealthThink.getStaticUser(),
                    userType: UserType.Owner,
                    name: "newAttribute",
                    description:"testDescription",
                    isPublicType:true
                    )
                    
    static FacilityAttributeLink sFacilityAttributeLink = new FacilityAttributeLink(
                    facility: healththink.HealthThink.getStaticFacility(),
                    attribute: healththink.HealthThink.getStaticFacilityAttribute()
                    )
                    
    static FacilityUserLink sFacilityUserLink = new FacilityUserLink(
                    facility: healththink.HealthThink.getStaticFacility(),
                    user: healththink.HealthThink.getStaticUser()
                    )
	
    static FacilityGroupUserLink sFacilityGroupUserLink = new FacilityGroupUserLink(
                    facilityGroup: healththink.HealthThink.getStaticFacilityGroup(),
                    user: healththink.HealthThink.getStaticUser()
                    )
	
    static FacilityAttributeRating sFacilityAttributeRating = new FacilityAttributeRating(
                    rating: 10,
                    user: healththink.HealthThink.getStaticUser(),
                    userType: UserType.Moderator
                    )
                    
    static FacilityGroup sFacilityGroup = new FacilityGroup(
                    groupName: "Test Facility Group",
                    summary: "Test Facility group Summary."
                    )
                    
    static FacilityScheduleEntry sFacilityScheduleEntry = new FacilityScheduleEntry(
                    beginDate: new Date(),
                    endDate: new Date(),
                    dateCreated: new Date(),
                    entry: "Test Schedule Entry Data",
                    userType: UserType.Owner
                    )
                    
    static FacilitySvc sFacilitySvc = new FacilitySvc(
                    name: "Test Service Name",
                    serviceSummary: "Test Service Summary.",
					facility: healththink.HealthThink.getStaticFacility()
                    )
                    
    static Forum sForum = new Forum(
            topic: "Static Topic",
            dateCreated: new Date(),
            userType: UserType.Owner,
			facility: healththink.HealthThink.getStaticFacility()
        )
        
    static Post sPost = new Post(
        user: healththink.HealthThink.getStaticUser(),
        forum:healththink.HealthThink.getStaticForum(),
        message: "Test Message for Post",
        dateCreated: new Date()
    )
    
    /* Accessors for testing/development */
    static Email getStaticEmail()
    {
            return healththink.HealthThink.sEmail
    }
    static User getStaticUser()
    {
            return healththink.HealthThink.sUser
    }
    static Address getStaticAddress()
    {
            return healththink.HealthThink.sAddress
    }
    static TelephoneNumber getStaticPhone()
    {
            return healththink.HealthThink.sPhone
    }
    static Facility getStaticFacility()
    {
            return healththink.HealthThink.sFacility
    }
    static FacilitySite getStaticFacilitySite()
    {
            return healththink.HealthThink.sFacilitySite
    }
    static Attribute getStaticFacilityAttribute()
    {
            return healththink.HealthThink.sAttribute
    }
    static FacilityUserLink getStaticFacilityUserLink()
    {
            return healththink.HealthThink.sFacilityUserLink
    }
    static FacilityAttributeLink getStaticFacilityAttributeLink()
    {
            return healththink.HealthThink.sFacilityAttributeLink
    }
    static FacilityAttributeRating getStaticFacilityAttributeRating()
    {
            return healththink.HealthThink.sFacilityAttributeRating
    }
    static FacilityGroup getStaticFacilityGroup()
    {
            return healththink.HealthThink.sFacilityGroup
    }
    static FacilityGroupUserLink getStaticFacilityGroupUserLink()
    {
            return healththink.HealthThink.sFacilityGroupUserLink
    }
    static FacilityScheduleEntry getStaticFacilityScheduleEntry()
    {
            return healththink.HealthThink.sFacilityScheduleEntry
    }
    static FacilitySvc getStaticFacilitySvc()
    {
            return healththink.HealthThink.sFacilitySvc
    }
    static Post getStaticPost()
    {
        return healththink.HealthThink.sPost
    }
    static Forum getStaticForum()
    {
        return healththink.HealthThink.sForum
    }
}
